import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

public class HelloWeb2 extends Applet implements MouseMotionListener
{
	int messageX = 125, messageY = 95;
	String leMessage;
	private int counter;

	public void init() {
		// Get the value of the parameter named "message" from the html
		// in the param section of the applet
		leMessage = getParameter("message");
		leMessage += " #";
		addMouseMotionListener(this);
	}
	public void HelloWeb() {
		counter = 0;
	}
	public void start( ) {
		counter++;
	}

	public void paint( Graphics gc ) {
		gc.setColor(java.awt.Color.green);
		gc.fill3DRect(30, 30, 30, 30, true);
		gc.drawString(leMessage+counter, messageX, messageY);
	}

	public void mouseMoved(MouseEvent e) {
	}
	public void mouseDragged(MouseEvent e) {
		counter++;
		messageX = e.getX();
		messageY = e.getY();
		repaint();
	}
	// DEPRECATED
// 	public boolean mouseDrag(Event evt, int x, int y) {
// 		counter++;
// 		messageX = x;
// 		messageY = y;
// 		repaint();
// 		return true;
// 	}
}
